Skip to content

TV Guide: keep the category you left, and keep its list while you watch - #370

Merged
ahXN00 merged 1 commit into
ahXN00:mainfrom
Quad-Plex:fix/guide-remembered-category
Nov 18, 2026
Merged

ahXN00 merged 1 commit into
ahXN00:mainfrom
Quad-Plex:fix/guide-remembered-category

Conversation

@Quad-Plex

Copy link
Copy Markdown
Contributor

Before you open this PR (required)

  • I read the User Guide and checked the app's Settings and existing functions — this change isn't already possible in the app.
  • I searched existing issues/PRs and this isn't a duplicate.

What does this PR do?

The TV Guide now remembers the list you left, and watching a channel from it keeps that list.

  • It reopens where you left it. The Guide's category lived in the view model only, so every app start put it back on All channels — with "TV Guide follows Live TV" off, the one case that switch's own help text covers ("the TV Guide keeps a category of its own"). It is now remembered per profile, written from a pick only: a startup choice and the jump to the playing channel's folder stay placements and never overwrite it. The category is resolved with a real read of the setting before the first load, never from the screen's state flow, whose first value predates DataStore's answer.
  • Watching keeps the list. A channel opened from the Guide armed the zap list from its provider folder, while the same channel opened from Live TV armed it from the list on screen — a Comedy Central favourite watched from the Guide zapped through its "Zattoo" folder and the player's channel list showed that folder. The Guide already passed its visible list to the shell and it was dropped; it is now used, with its key, exactly as Live TV's is. It still falls back to the channel's own folder when the row is not in that list, or when the list is too thin to step through, so CH± is never left with one entry.
  • Startup keeps it too. "Start on the last channel" replaced the remembered category with the channel's folder on every launch, in Live TV's list view and in the Guide. Both now keep the list you chose when it still holds the channel, and fall back exactly as before when it does not.

Two behaviour changes worth knowing: opening a channel from the Guide now zaps within the Guide's visible rows (its category ∩ channels with guide data ∩ search), and playerClosed is renamed focusPlayingOnLoad because a startup mode sets it too.

No new user-visible strings: everything reuses existing labels. The Guide's memory has no switch of its own — it is what "keeps a category of its own" always meant; say the word if you would rather it hang off one.

Which issue / improvement does it address?

Reported from the same two-playlist setup: re-picking Favorites in the Guide after every restart, and the zap direction changing depending on whether a channel was opened from Live TV or from the Guide — the two paths disagreed, and nothing in Settings reconciled them. Builds on the sharing added in #325, which covers the switch-on case.

Draft, because it depends on the core PR ahXN00/OwnTV_Core#86 (last_guide_category). CI resolves the published core, so it stays red until that ships and this branch is rebased onto the automated owntvCore bump. Locally it is built against core's source (-Powntv.corePath) and is green.

How was it tested?

  • Device(s) tested on: Chromecast with Google TV (sabrina, Android 14), side-loaded build.
  • What you exercised: picking Favorites in the Guide, restarting the app, opening the Guide again; opening Comedy Central from the Guide and pressing Left/Up/Down in the player; the same from Live TV for comparison; and "start on the last channel" in both the list and guide views.
  • :app:testStandardDebugUnitTest, lintStandardDebug and the three i18n checks pass against the core branch; the backup import/export path was checked to ignore the new key in both directions.

Checklist

  • Builds locally (./gradlew assembleStandardDebug against the core branch); CI needs Remember the TV Guide's own category per profile OwnTV_Core#86 released first
  • Tested on a real Android TV / Fire TV device — D-pad/remote navigation works
  • No user data is wiped (Room migrations stay additive) — no schema change
  • Keeps OwnTV player-only (no bundled channels/content)
  • Commit messages are clear (they become the release notes)

Three ways the list on screen was not the list the app used after it was
chosen:

* The TV Guide's own category lived in the view model only, so every app
  start put the Guide back on All and Favorites had to be picked again —
  with "TV Guide follows Live TV" off, the setting's own promise ("keeps a
  category of its own"). It is now remembered per profile, written from a
  pick only; a startup choice and the jump to the playing channel's folder
  stay placements and never overwrite it. The opening category is resolved
  with a real read of the setting, not from the screen's state flow, whose
  first value is `false` before DataStore answers.

* A channel opened from the Guide armed the zap list from its provider
  folder, while the same channel opened from Live TV armed it from the list
  on screen. So a Comedy Central favourite watched from the Guide zapped
  through its "Zattoo" folder and the player's channel list showed that
  folder, and the same channel from Live TV zapped through Favorites. The
  Guide already passed its visible list to the shell — it was dropped on the
  floor. It now arms the zap list with it and its key, and falls back to the
  channel's own folder when the row is not in that list, or when the list is
  too thin to step through: the Guide's rows are its category ∩ guide-matched
  channels ∩ search, so CH± must not be left with one entry.

* "Start on the last channel" then replaced the remembered category with the
  channel's provider folder on every launch in both Live TV's list view and
  the Guide. Both now keep the list the user chose when it still holds the
  channel, and fall back exactly as before when it does not.

The mark that makes a guide focus the channel the app opened for it is no
longer "player closed" only: a startup mode sets it too, so a Guide that
landed on a list without that channel opens the channel's own category. That
rename — `playerClosed` → `focusPlayingOnLoad` — is the one non-additive app
change besides `watchFromGuide`/`onPlayChannel` gaining parameters.
ahXN00 added a commit that referenced this pull request Nov 18, 2026
… lists, stepper taps, Sports header, fixed sort on Favorites/History

Merges #370 (TV Guide: keep the category you left, and keep its list
while you watch). EpgViewModel splits a picked category (saved per
profile through core's LAST_GUIDE_CATEGORY) from one the app places;
LiveViewModel.watchFromGuide arms the Guide's visible rows as the zap
list; startup modes keep the remembered category when it holds the
channel.

Steppers: StageStepper takes the row's onStep, so a touch or air-mouse
tap on "-" lowers and on "+" raises. The buttons take no focus (the
D-pad still treats the row as one control) and consume the tap, so the
row's own click, which steps up, no longer fires instead. A disabled row
ignores them. Fixes the setup wizard's zoom and text size, Glass, Sports
and Settings rows. Fixes #359

CH+/CH- page the programme page (ProgrammeDayPage, index-based, jumps
scroll instantly) and the Live TV catch-up list (CatchupDialog: the row
jumped to takes the focus requester), with the user's skip counts and
long-press to the ends, as every other list. Fixes #373

Sports: the continue pill (last channel / resume) is not drawn on the
Sports section, whose header runs to the top right, and is capped at
300 px elsewhere; a long name in a long language covered the tabs.

Favorites and History: their order is their own (moved items, then
newest first), so the sort tool reads a greyed "Newest first" there and
the D-pad skips it (StageTool enabled = false; VodFixedSortTool for the
Movies/Series layouts). The stored sort is untouched and applies to every
other list. Favorites and History sort rule, rebuilt from
ahXN00/OwnTV_Core#85 / #369.

Docs: CHANGELOG, USER_GUIDE (CH+/CH- lists, Guide memory, fixed sort),
product brief.

Verified: assembleStandardRelease and lintStandardDebug (0 errors), i18n
literal and overflow checks. On the TCL TV (release build installed over
the existing app, data kept): no pill on Sports; History sort dim and
skipped; CH- / CH+ page the programme page and the catch-up list; "-"
and "+" by touch on Popup size; the Guide reopened on its own category
after a force-stop; CH+ after a pick in a two-channel Guide category
tuned the Guide's other channel, not the provider folder's next one.
Not exercised: holding CH+/CH- to jump to the ends (adb cannot hold the
key long enough).
@ahXN00
ahXN00 merged commit 42c0a01 into ahXN00:main Nov 18, 2026
1 check passed
@ahXN00 ahXN00 self-assigned this Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants